const express = require('express')
const app = express()

// 设置路由路径
const login = require('./serve/api/login')

app.use('/', express.static('./src/page/'));

// 配置路由
app.use('/api', login)
    
app.all('*', (req, res) => {
    res.send('<div>404</div>')
})

app.set('port', process.env.PORT || 8088); // 设定监听端口

app.listen(app.get('port'), () => {
    console.log(` http://localhost:8088`)
    console.log('服务启动')
})
